import request from "../request";
// 盘点

// 窍的盘点记录 - 窍详情使用
export const getBoxScanList = (userBoxId, params) => {
    return request({
        url: `/iot/scan/listByUserBoxId?userBoxId=${userBoxId}`,
        params: params,
        method: "get",
        methodType: "jsonStr",
    });
};

//窍 最近一次盘点时间 - 申请调阅 - 窍列表使用
export const getBoxLastScanTime = (data) => {
    return request({
        url: '/iot/scan/lastScanTime',
        data: data,
        method: "post",
        methodType: "jsonStr",
    });
};


// 盘点报表页 --------------
// 盘点报表
export const getInventoryReport = (params) => {
    return request({
        url: '/iot/scan/report',
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};

// 用户盘点记录
export const getInventoryRecord = (params) => {
    return request({
        url: '/iot/scan/record',
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};

// 手机端 - 门禁列表
export const getLockApplyList = (data, params) => {
    return request({
        url: '/iot/lock/applyList',
        data: data,
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};

// 手机端 - 门禁审批
export const lockAppLicensing = (params) => {
    return request({
        url: '/iot/lock/appLicensing',
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};


//  入门申请demo  
// 审批列表
export const getEntranceApplyList = (data, params) => {
    return request({
        url: '/iot/entrance/applyList',
        data: data,
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};

// 入门申请 -- 审批
export const entranceAppLicensing = (params) => {
    return request({
        url: '/iot/entrance/appLicensing',
        params: params,
        method: "post",
        methodType: "jsonStr",
    });
};
